﻿using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System;
using System.Linq;
using System.Text;

namespace ScormModel
{
    [Serializable()]
    public class Presentation
    {
        [NonSerialized]
        private XmlNode _presentationContent;
        private NavigationInterface _navigationInterface;

         [XmlElement("navigationInterface", Namespace = "http://www.adlnet.org/xsd/adlnav_v1p3")]
        public NavigationInterface NavigationInterface
        {
            get { return this._navigationInterface; }
            set { this._navigationInterface = value; }
        }
        
        [XmlIgnoreAttribute]
        public XmlNode PresentationContent
        {
            get { return this._presentationContent; }
            set { this._presentationContent = value; }
        }
        public void buildPresentation()
        {
            //incomplete
            XmlNodeList childList = _presentationContent.ChildNodes;
            for (int i = 0; i < childList.Count; i++)
            {
                if (childList[i].Name == "adlnav:navigationInterface")
                {
                    _navigationInterface = new NavigationInterface();
                    _navigationInterface.NavigationInterfaceContent = childList[i];
                    _navigationInterface.buildNavigationInterface();
                }
            }
        }
    }
}
